<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="/session/css/common.css"/>
    <script type="text/javascript" src="/plan/js/jquery.1.9.1.js" ></script>
       <script type="text/javascript" src="/plan/js/layer.js" ></script>
	<script type="text/javascript" src="/plan/js/rem.js" ></script>
    <title>建场次</title>
</head>
<body>
	<div class="session_top">{$info->department_text}的开会计划</div>

		<ul class="session_list">
			<li>场次管理
				{if isset($WeekModel['Score'][$type]['add'])&&  ($plan_auth['department'] == $info['department'])}
				<a href="/index/plan/public_add/type/{$type}/ids/{$ids}"><img class="add" src="/session/img/jia.png" /></a>
				{/if}
			</li>
		<?php if(!empty($WeekInfo[$type])){?>
			<?php foreach($WeekInfo[$type] as $k=>$v){?>
				<li id="season_{$v['id']}">
					{if isset($WeekModel['Score'][$type]['edit']) &&  ($plan_auth['department'] == $info['department'])}
					<a href="/index/plan/public_edit/type/{$type}/ids/{$v['id']}">
					{else}
					<a href="javascript:;">
					{/if}
					<span class="session_info">第{$k+1}场&nbsp;&nbsp;|&nbsp;&nbsp;<span>{:date('m月d日H:i',strtotime($v['season_time']))}</span></span>
					</a>
					{if isset($WeekModel['Score']['Season']['delete']) &&  ($plan_auth['department'] == $info['department'])}
						<img class="cut" attrid="{$v['id']}" src="/person/img/cut.png" />
					{/if}
					
				</li>
			<?php }?>
	 	<?php }?>
			
		</ul>

</body>
<script>
$(function(){
	$('.cut').click(function(){
		var ids = $(this).attr("attrid");
		var index = layer.open({type: 2});
		$.ajax({
		  type: 'post',
		  url:"/index/plan/public_delete/type/Season/ids/"+ids,
		  dataType: "json",
		  success: function(data){
		  	if(data.code == 1){
		  		$("#season_"+ids).remove();
		  	}
			layer.open({
				content:data.msg,
				skin: 'msg',
				time: 2 //2秒后自动关闭
			});
			layer.close(index);
		  }
		});
	});
});
</script>
</html>
